package clinit;

public class demo1 {
    public static void main(String[] args) {
        System.out.println(S.a);//直接访问父类的静态变量，不会触发子类的初始化。 P static block 10
//        S s = new S();
//        System.out.println(s.b);
    }
}

class P {
    public static int a = 10;
    int b = 20;

    static {
        System.out.println("P static block");
    }
}

class S extends P {
    static {
        System.out.println("S static block");
    }
}
